package domain.entities;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * LaboratorioLocalExternalValidationType entity. @author MyEclipse Persistence
 * Tools
 */
@Entity
@Table(name = "laboratorio_local_external_validation_type", catalog = "bms")
public class LaboratorioLocalExternalValidationType implements
		java.io.Serializable {

	// Fields

	private Integer id;
	private LaboratorioLocal laboratorioLocal;
	private Date date;
	private String type;

	// Constructors

	/** default constructor */
	public LaboratorioLocalExternalValidationType() {
	}

	/** minimal constructor */
	public LaboratorioLocalExternalValidationType(
			LaboratorioLocal laboratorioLocal) {
		this.laboratorioLocal = laboratorioLocal;
	}

	/** full constructor */
	public LaboratorioLocalExternalValidationType(
			LaboratorioLocal laboratorioLocal, Date date, String type) {
		this.laboratorioLocal = laboratorioLocal;
		this.date = date;
		this.type = type;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "LABORATORIO_LOCALid", nullable = false)
	public LaboratorioLocal getLaboratorioLocal() {
		return this.laboratorioLocal;
	}

	public void setLaboratorioLocal(LaboratorioLocal laboratorioLocal) {
		this.laboratorioLocal = laboratorioLocal;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "date", length = 10)
	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name = "type")
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

}